﻿#include "dxstdafx.h"
#include "AnalyseTreeExtra.h"

/*中间特殊结点*/
bool AnalyseTreeNodeCondition_custom_tooltip::DoExecute(const AnyData& input, std::wstring& wstrDescription) const
{
	CHECK_RE_FALSE(m_pNodeCondition_hidden_tooltip.get());
	return m_pNodeCondition_hidden_tooltip->DoExecute(input, wstrDescription);
}

bool AnalyseTreeNodeCondition_custom_tooltip::InsertNode(std::unique_ptr<AnalyseTreeNodeCondition> pNode)
{
	if (m_pNodeCondition_hidden_tooltip.get())
	{
		CommonFunc::ErrorMessageBox(CString("repeated node!"));
		return false;
	}
	m_pNodeCondition_hidden_tooltip = std::move(pNode);
	return true;
}

bool AnalyseTreeNodeCondition_OtherTitle::DoExecute(const AnyData& input, std::wstring& wstrDescription) const
{
	return true;
}

bool AnalyseTreeNodeCondition_OtherTitle::InsertNode(std::unique_ptr<AnalyseTreeNodeCondition> pNode)
{
	CHECK_RE_FALSE(pNode.get());
	if (m_pChildNode)
	{
		CommonFunc::ErrorMessageBox(CString("repeated node!"));
		return false;
	}
	m_pChildNode = std::move(pNode);
	return true;
}

bool AnalyseTreeNodeCondition_any_previous_holder::DoExecute(const AnyData& input, std::wstring& wstrDescription) const
{
	return true;
}

bool AnalyseTreeNodeCondition_any_previous_holder::InsertNode(std::unique_ptr<AnalyseTreeNodeCondition> pNode)
{
	CHECK_RE_FALSE(pNode.get());
	if (m_pChildNode)
	{
		CommonFunc::ErrorMessageBox(CString("repeated node!"));
		return false;
	}
	m_pChildNode = std::move(pNode);
	return true;
}

bool AnalyseTreeNodeCondition_any_realm_province::DoExecute(const AnyData& input, std::wstring& wstrDescription) const
{
	return true;
}

bool AnalyseTreeNodeCondition_any_realm_province::InsertNode(std::unique_ptr<AnalyseTreeNodeCondition> pNode)
{
	CHECK_RE_FALSE(pNode.get());
	if (m_pChildNode)
	{
		CommonFunc::ErrorMessageBox(CString("repeated node!"));
		return false;
	}
	m_pChildNode = std::move(pNode);
	return true;
}

bool AnalyseTreeNodeCondition_OtherProvince::DoExecute(const AnyData& input, std::wstring& wstrDescription) const
{
	return true;
}

bool AnalyseTreeNodeCondition_OtherProvince::InsertNode(std::unique_ptr<AnalyseTreeNodeCondition> pNode)
{
	CHECK_RE_FALSE(pNode.get());
	if (m_pChildNode)
	{
		CommonFunc::ErrorMessageBox(CString("repeated node!"));
		return false;
	}
	m_pChildNode = std::move(pNode);
	return true;
}

bool AnalyseTreeNodeCondition_owner::DoExecute(const AnyData& input, std::wstring& wstrDescription) const
{
	return true;
}

bool AnalyseTreeNodeCondition_owner::InsertNode(std::unique_ptr<AnalyseTreeNodeCondition> pNode)
{
	CHECK_RE_FALSE(pNode.get());
	if (m_pChildNode)
	{
		CommonFunc::ErrorMessageBox(CString("repeated node!"));
		return false;
	}
	m_pChildNode = std::move(pNode);
	return true;
}



/*尾部特殊结点*/
bool TailNodeCondition_always::DoExecute(const AnyData& input, std::wstring& wstrDescription) const
{
	return m_b_always;
}

bool TailNodeCondition_ai::DoExecute(const AnyData& input, std::wstring& wstrDescription) const
{
	return true;
}

bool TailNodeCondition_year::DoExecute(const AnyData& input, std::wstring& wstrDescription) const
{
	return true;
}

bool TailNodeCondition_religion::DoExecute(const AnyData& input, std::wstring& wstrDescription) const
{
	return true;
}

bool TailNodeCondition_religion_group::DoExecute(const AnyData& input, std::wstring& wstrDescription) const
{
	return true;
}

bool TailNodeCondition_culture::DoExecute(const AnyData& input, std::wstring& wstrDescription) const
{
	return true;
}

bool TailNodeCondition_culture_group::DoExecute(const AnyData& input, std::wstring& wstrDescription) const
{
	return true;
}

bool TailNodeCondition_has_holder::DoExecute(const AnyData& input, std::wstring& wstrDescription) const
{
	return true;
}

bool TailNodeCondition_is_republic::DoExecute(const AnyData& input, std::wstring& wstrDescription) const
{
	return true;
}


